# 创建 花括号 或是内置函数

scores = {
    'zhangsan': 100,
    'lisi': 77,
}
print(scores, type(scores))

#
myDict = dict(a=1232, b= 566)
print(myDict)

# get
print( scores.get('lisi'))
print( scores.get('lisi2')) #None

# del
# del scores['xxxx'] #KeyError: 'xxxx'
del scores['zhangsan'] #KeyError: 'xxxx'

# add or update
scores['wangwu'] = '90'

print(scores)

# iterator
print(scores.keys())
print(scores.values())
print(scores.items())
for entry in  scores.items():
    print(entry)
